#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int is_exit(char *str2,char ch)
{
	int i = 0;
	while (str2[i])
	{
		if (str2[i] == ch)
		{
			return 1;
		}
		i++;
	}
	return 0;
}
int main()
{
	char arr1[100] = { 0 };
	char arr2[100] = { 0 };
	gets(arr1);
	gets(arr2);
	int i = 0;
	while (arr1[i])
	{
		if (is_exit(arr2, arr1[i]) == 0)
		{
			printf("%c", arr1[i]);
		}
		i++;
	}
	return 0;
}